!!MP Inlines.f

C	An example of a FORTRAN Resource for Microsoft Excel 3.0
C	This example call illustrates the use of the Passing and Returning a
C	Pointer to an Array Structure, Data Type K. Testing for this example
C	was done with Language Systems FORTRAN version 3.0
C	
C	Below are the commands that were executed to create the 
C	code resource

!!IFC FALSE
 FORTRAN DATAK2.f -opt=1 -noimplicit
Link -w -f -srt -ad 4 -t '????' -c '????' ¶
-m DATAK2 -sn Main=DATAK2 ¶
-sn f_RunTime=DATAK2 ¶
-sn f_Intrinsics=DATAK2 ¶
	DATAK2.f.o ¶
	"{FLibraries}"OutpwStubs.o ¶
	"{Libraries}"Runtime.o ¶
	"{Libraries}"Interface.o ¶
	"{FLibraries}"FORTRANlib.o ¶
	"{FLibraries}"IntrinsicLib.o ¶
	"{FLibraries}"FSANELib.o ¶
	-o DATAK2.rsc
!!ENDC

C	Source code

	integer*4 function DATAK2(%val(a))
	
	integer*2 i,items
	
	structure /fp/
		integer*2 rows
		integer*2 columns
		real*8    dparray(100)
	end structure
	
	pointer /fp/ a
		
	items = a^.rows * a^.columns
	do i = 1,items
		a^.dparray(i) = a^.dparray(i) * 2
	enddo
	DATAK2 = a
	
	return
	end
	
		
	